---
apiVersion: apps/v1
kind: Deployment
metadata:
  annotations: {}
  labels:
    k8s.kuboard.cn/name: yyds6
  name: yyds6
  namespace: yyds
spec:
  minReadySeconds: 45
  progressDeadlineSeconds: 600
  replicas: 2
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      k8s.kuboard.cn/name: yyds6
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      creationTimestamp: null
      labels:
        k8s.kuboard.cn/name: yyds6
    spec:
      hostAliases:
        - ip: "192.168.31.213"
          hostnames:
          - "nts1.server"
      containers:
        - image: 192.168.31.213:5000/yyds6:{tag}
          imagePullPolicy: Always
          name: yyds6
          resources: {}
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          ports:
          - containerPort: 9996
          readinessProbe:
            httpGet:
              path: /actuator/health/readiness
              port: 9996
            initialDelaySeconds: 60
            periodSeconds: 10
            timeoutSeconds: 5            # 超时时间设置
            successThreshold: 1
            failureThreshold: 10
          startupProbe:
            httpGet:
              path: /actuator/health/liveness
              port: 9996
            initialDelaySeconds: 60
            failureThreshold: 10
            timeoutSeconds: 5
            periodSeconds: 10
          livenessProbe:                 # 存活探针
            httpGet:
              path: /actuator/health/liveness
              port: 9996
            initialDelaySeconds: 60      # 延迟加载时间
            periodSeconds: 10            # 重试时间间隔
            timeoutSeconds: 5            # 超时时间设置
            successThreshold: 1          # 健康阈值
            failureThreshold: 10          # 不健康阈值
      dnsConfig: {}
      dnsPolicy: ClusterFirstWithHostNet
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30

---
apiVersion: v1
kind: Service
metadata:
  annotations: {}
  labels:
    k8s.kuboard.cn/name: yyds6
  name: yyds6
  namespace: yyds
spec:
  clusterIP: 10.50.45.198
  clusterIPs:
    - 10.50.45.198
  externalTrafficPolicy: Cluster
  internalTrafficPolicy: Cluster
  ipFamilies:
    - IPv4
  ipFamilyPolicy: SingleStack
  ports:
    - name: '9996'
      nodePort: 32111
      port: 9996
      protocol: TCP
      targetPort: 9996
  selector:
    k8s.kuboard.cn/name: yyds6
  sessionAffinity: None
  type: NodePort

